From: Jochen Sprickerhof Date: Tue, 11 Nov 2014 13:58:09 +0000 (+0100) Subject: Build without OpenNI when it's not available X-Git-Tag: archive/raspbian/1.14.0+dfsg-2+rpi1^2~230 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9bfe9f814d9dba99596c7a4fefa342157b65bcdd;p=pcl.git Build without OpenNI when it's not available Add Patch 0003-Always-build-libpcl_apps.so.patch taken from upstream --- diff --git a/debian/control b/debian/control index 631fe563..a91f60a1 100644 --- a/debian/control +++ b/debian/control @@ -19,7 +19,7 @@ Build-Depends: debhelper (>= 9), dh-exec (>=0.3), libflann-dev, libvtk5-dev, libqhull-dev, - libopenni-dev, + libopenni-dev [i386 amd64], libqt4-opengl-dev, libusb-1.0-0-dev, freeglut3-dev, @@ -39,7 +39,7 @@ Depends: libboost-all-dev, libflann-dev, libvtk5-dev, libqhull-dev, - libopenni-dev, + libopenni-dev [i386 amd64], libpcl1.7 (= ${binary:Version}), ${misc:Depends} Suggests: libpcl-doc diff --git a/debian/patches/0003-Always-build-libpcl_apps.so.patch b/debian/patches/0003-Always-build-libpcl_apps.so.patch new file mode 100644 index 00000000..1f455829 --- /dev/null +++ b/debian/patches/0003-Always-build-libpcl_apps.so.patch @@ -0,0 +1,118 @@ +From 6247f993fde67cb79bc6e9a4556de07ce0d031c6 Mon Sep 17 00:00:00 2001 +From: Jochen Sprickerhof +Date: Tue, 11 Nov 2014 11:38:43 +0100 +Subject: [PATCH 3/3] Always build libpcl_apps.so + +- Remove superfluous checks for VTK and OpenNI in apps +--- + apps/CMakeLists.txt | 61 +++++++++++++++++++---------------------------------- + 1 file changed, 22 insertions(+), 39 deletions(-) + +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index 93b11e9..4f7e658 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -2,25 +2,6 @@ set(SUBSYS_NAME apps) + set(SUBSYS_DESC "Application examples/samples that show how PCL works") + set(SUBSYS_DEPS common geometry io filters sample_consensus segmentation visualization kdtree features surface octree registration keypoints tracking search recognition) + +-# Find VTK +-if(NOT VTK_FOUND) +- set(DEFAULT FALSE) +- set(REASON "VTK was not found.") +-else(NOT VTK_FOUND) +- set(DEFAULT TRUE) +- set(REASON) +- include("${VTK_USE_FILE}") +-endif(NOT VTK_FOUND) +- +-# OpenNI found? +-if(NOT OPENNI_FOUND) +- set(DEFAULT FALSE) +- set(REASON "OpenNI was not found.") +-else(NOT OPENNI_FOUND) +- set(DEFAULT TRUE) +- set(REASON) +-endif(NOT OPENNI_FOUND) +- + set(DEFAULT FALSE) + PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ${DEFAULT} "${REASON}") + PCL_SUBSYS_DEPEND(build "${SUBSYS_NAME}" DEPS ${SUBSYS_DEPS} OPT_DEPS openni vtk) +@@ -47,6 +28,12 @@ if(build) + endif(LIBUSB_1_FOUND) + + if (VTK_FOUND) ++ ++ include("${VTK_USE_FILE}") ++ ++ set(incs "include/pcl/${SUBSYS_NAME}/render_views_tesselated_sphere.h") ++ set(srcs "src/render_views_tesselated_sphere.cpp") ++ + PCL_ADD_EXECUTABLE(pcl_ppf_object_recognition "${SUBSYS_NAME}" src/ppf_object_recognition.cpp) + target_link_libraries(pcl_ppf_object_recognition pcl_common pcl_io pcl_filters pcl_features pcl_registration pcl_visualization pcl_sample_consensus pcl_segmentation) + +@@ -162,11 +149,6 @@ if(build) + + endif () + +- set(incs +- include/pcl/${SUBSYS_NAME}/render_views_tesselated_sphere.h +- include/pcl/${SUBSYS_NAME}/timer.h) +- set(srcs src/render_views_tesselated_sphere.cpp) +- + if (QHULL_FOUND) + PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_openni_3d_convex_hull "${SUBSYS_NAME}" src/openni_3d_convex_hull.cpp) + target_link_libraries(pcl_openni_3d_convex_hull pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_features pcl_surface) +@@ -177,10 +159,6 @@ if(build) + PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_openni_tracking "${SUBSYS_NAME}" src/openni_tracking.cpp) + target_link_libraries(pcl_openni_tracking pcl_common pcl_io pcl_surface pcl_visualization pcl_filters pcl_features pcl_segmentation pcl_tracking pcl_search) + +- set(incs "include/pcl/${SUBSYS_NAME}/dominant_plane_segmentation.h" ${incs}) +- set(impl_incs "include/pcl/${SUBSYS_NAME}/impl/dominant_plane_segmentation.hpp") +- set(srcs src/dominant_plane_segmentation.cpp ${srcs}) +- + PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_openni_planar_convex_hull "${SUBSYS_NAME}" src/openni_planar_convex_hull.cpp) + target_link_libraries(pcl_openni_planar_convex_hull pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_surface) + +@@ -189,17 +167,6 @@ if(build) + + endif() # QHULL_FOUND + +- # Install include files +- PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}" ${incs}) +- PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl" ${impl_incs}) +- +- set(LIB_NAME "pcl_${SUBSYS_NAME}") +- PCL_ADD_LIBRARY("${LIB_NAME}" "${SUBSYS_NAME}" ${srcs} ${impl_incs} ${incs}) +- target_link_libraries("${LIB_NAME}" pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search) +- +- PCL_MAKE_PKGCONFIG("${LIB_NAME}" "${SUBSYS_NAME}" "${SUBSYS_DESC}" "" "" "" "" "") +- +- + PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_ni_agast "${SUBSYS_NAME}" src/ni_agast.cpp) + target_link_libraries(pcl_ni_agast pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_features pcl_keypoints pcl_surface pcl_search) + +@@ -231,4 +198,20 @@ if(build) + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/${subdir}") + endforeach(subdir) + ++ set(incs ++ "include/pcl/${SUBSYS_NAME}/dominant_plane_segmentation.h" ++ "include/pcl/${SUBSYS_NAME}/timer.h" ++ ${incs} ++ ) ++ set(impl_incs "include/pcl/${SUBSYS_NAME}/impl/dominant_plane_segmentation.hpp") ++ set(srcs "src/dominant_plane_segmentation.cpp" ${srcs}) ++ ++ set(LIB_NAME "pcl_${SUBSYS_NAME}") ++ PCL_ADD_LIBRARY("${LIB_NAME}" "${SUBSYS_NAME}" ${srcs} ${impl_incs} ${incs}) ++ target_link_libraries("${LIB_NAME}" pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search) ++ PCL_MAKE_PKGCONFIG("${LIB_NAME}" "${SUBSYS_NAME}" "${SUBSYS_DESC}" "" "" "" "" "") ++ # Install include files ++ PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}" ${incs}) ++ PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl" ${impl_incs}) ++ + endif(build) +-- +2.1.3 + diff --git a/debian/patches/series b/debian/patches/series index 8bc793ed..b8981ee0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-Package-names-for-OpenNI-and-OpenNI2-were-wrong-in-c.patch 0002-Corrected-openni-dev-and-openni2-dev-in-PCLConfig.cm.patch +0003-Always-build-libpcl_apps.so.patch